package com.tyut.musicdreamer.service.user.enums;

import com.tyut.musicdreamer.framework.starter.convention.respstatus.RespStatus;
import lombok.Getter;

/**
 * 用户服务错误码
 */
@Getter
public enum UserErrorCode implements RespStatus {

    USERNAME_ALREADY_EXISTS("40001", "用户名已存在"),
    EMAIL_ALREADY_EXISTS("40002", "邮箱已被使用"),
    INVALID_CREDENTIALS("40003", "用户名或密码错误"),
    ACCOUNT_DISABLED("40004", "账号已被禁用"),
    INVALID_PASSWORD("40005", "原密码错误"),
    FILE_SIZE_EXCEEDED("40006", "文件大小超过限制"),
    UNSUPPORTED_FILE_TYPE("40007", "不支持的文件类型"),
    FILE_UPLOAD_FAILED("40008", "文件上传失败"),
    USER_NOT_FOUND("40009", "用户不存在"),
    OPERATION_NOT_SUPPORTED("40010", "此操作不支持");

    private final String code;
    private final String message;

    UserErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
} 